package com.ruoyi.project.tool.swagger.UserController;

import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.domain.SysOption;
import com.ruoyi.project.system.service.ISysOptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 单字段Controller
 *
 * @author theme
 * @date 2020-05-27
 */
@Api(description = "表单字段维护")
@RestController
@RequestMapping("/mobileUser/option")
public class UserOptionController extends BaseController {
    @Autowired
    private ISysOptionService sysOptionService;

    /**
     * 查询单字段列表
     */
    @ApiOperation("查询单字段列表")
    @GetMapping("/list")
    public TableDataInfo list(SysOption sysOption) {
        startPage();
        List<SysOption> list = sysOptionService.selectSysOptionListAll(sysOption);
        return getDataTable(list);
    }

}
